<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2015/7/14 0014
  Time: 17:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page  import="java.util.*" language="java"  pageEncoding="utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<%
  String path = request.getContextPath();
  String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<base href="<%=basePath%>">
<html>
<head>
    <title>登陆</title>
    <link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico" media="screen" />
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <script src=/jquery/jquery.min.js></script>
    <script src="/js/bootstrap.min.js"></script>
    <style type="text/css">
        .wrapper{
            width: 750px;
            margin: 0 auto 30px;
            overflow: hidden;
            zoom: 1;
        }
        .warnFont{

        }
    </style>
</head>
<body>
<div class="jumbotron">
    <div class="container">
        <div class="wrapper">
            <h3>登陆一天:</h3>
        </div>
        <form class="form-horizontal" role="form" id="login" action="user/login.htm" method="post">
            <div class="form-group">
                <label for="account" class="col-md-3 control-label">账号</label>
                <div class="col-md-3">
                    <input type="text" class="form-control" id="account" name="account"
                           placeholder="邮箱/手机号" value="<c:if test='${account != null}'>${account}</c:if>">
                </div>
            </div>
            <div class="form-group">
                <label for="password" class="col-md-3 control-label">密码</label>
                <div class="col-md-3">
                    <input type="password" class="form-control" id="password" name="password"
                           placeholder="请输入登陆密码" value="<c:if test='${password != null}'>${password}</c:if>">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-3 col-md-10">
                    <div class="checkbox">
                        <label>
                            <input type="checkbox"> 下次自动登陆|<a>忘记密码了</a>|<a href="user/get_register.htm">注册账号</a>
                        </label>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-3 col-md-3">
                    <button type="submit" class="btn btn-default">登陆</button>
                    <c:choose>
                        <c:when test="${code != null}">
                            <span style="color: tomato; margin-left: 2em">${code}</span>
                        </c:when>
                    </c:choose>
                </div>
            </div>
        </form>
    </div>
</div>
</body>
<%--<script>--%>
    <%--function login() {--%>
        <%--$.ajax({--%>
            <%--cache:true,--%>
            <%--type:"post",--%>
            <%--url:"user/register.htm",--%>
            <%--data:$("#login").serialize(),//获得表单数据--%>
<%--//            dataType:"json",--%>
            <%--async:false,--%>
            <%--error:function(request) {--%>
                <%--alert("网络发生了一个错误！")--%>
            <%--},--%>
            <%--success:function(data) {--%>
                <%--alert(data);--%>
            <%--}--%>
        <%--});--%>
        <%--$("#register")--%>
    <%--}--%>
<%--</script>--%>
</html>

